Skip to content

Fix: Sort Blocks re-grasps removed blocks and fails when the table is cleared (v8.10 backport)#742

Merged
fdavulcu merged 2 commits into
v8.10from
backport/sort-blocks-fixes-v8.10
Jun 30, 2026
Merged

Fix: Sort Blocks re-grasps removed blocks and fails when the table is cleared (v8.10 backport)#742
fdavulcu merged 2 commits into
v8.10from
backport/sort-blocks-fixes-v8.10

Conversation

@fdavulcu

Copy link
Copy Markdown

Backports two merged fixes for the dual_arm_sim Sort Blocks objective to v8.10.

Stale point-cloud vector (backport of #647): Create Point Cloud Vector From Masks reset {pose_stamped_vector}, but the ForEach builds {point_cloud_vector} — detections accumulated, so Find with prompt's GetElementOfVector index="0" always returned the stalest detection (a removed block). Now resets {point_cloud_vector} via ResetVector.

Graceful completion (backport of #738): wraps the KeepRunningUntilFailure loop in ForceSuccess so a cleared table reports success; the trailing CLIPSeg "no masks" message is the expected end-of-run signal (noted in the tree description).

The sort_blocks.xml diff is whitespace-dominated: prettier reindents the loop body when it's wrapped in ForceSuccess. The semantic change is just the ForceSuccess decorator and the tree description — view with ?w=1 / "Hide whitespace."

@fdavulcu fdavulcu added this to the 8.10.8 milestone Jun 26, 2026
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d311b5d4-f092-42bb-a323-193b1cc766a9

📥 Commits

Reviewing files that changed from the base of the PR and between 4543585 and 2fe3f11.

📒 Files selected for processing (2)
  • src/moveit_pro_franka_configs/dual_arm_sim/objectives/create_point_cloud_vector_from_masks.xml
  • src/moveit_pro_franka_configs/dual_arm_sim/objectives/sort_blocks.xml
✅ Files skipped from review due to trivial changes (1)
  • src/moveit_pro_franka_configs/dual_arm_sim/objectives/sort_blocks.xml
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/moveit_pro_franka_configs/dual_arm_sim/objectives/create_point_cloud_vector_from_masks.xml

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Corrected the initial reset behavior in a simulation objective so it resets the intended point cloud vector during setup, improving initial state handling.
  • Documentation

    • Enhanced the “Sort Blocks” behavior tree description to clarify how it clears colored blocks and to note the expected no-masks warning when a color runs out of blocks.

Walkthrough

One objective tree now resets point_cloud_vector instead of pose_stamped_vector, and another updates its top-level BehaviorTree description to explain the block-clearing behavior and the expected CLIPSeg no-masks condition.

Changes

Point Cloud Reset Target

Layer / File(s) Summary
Reset action switch
src/moveit_pro_franka_configs/dual_arm_sim/objectives/create_point_cloud_vector_from_masks.xml
The sequence reset step now calls ResetVector for point_cloud_vector instead of ResetPoseStampedVector for pose_stamped_vector.

Sort Blocks Description

Layer / File(s) Summary
BehaviorTree description update
src/moveit_pro_franka_configs/dual_arm_sim/objectives/sort_blocks.xml
The _description attribute changes from empty text to an explanatory message about clearing colored blocks and the expected CLIPSeg no-masks condition when a color runs out.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description matches the backported Sort Blocks fixes and explains the point-cloud reset and graceful completion changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Human Review Check ✅ Passed Changes are confined to dual_arm_sim objective XML configs; no core behavior, public API/SDK, infra, or launch-script surfaces are touched.

Comment @coderabbitai help to get the list of available commands.

@fdavulcu fdavulcu marked this pull request as ready for review June 26, 2026 07:30

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/moveit_pro_franka_configs/dual_arm_sim/objectives/sort_blocks.xml`:
- Around line 3-7: The Sort Blocks objective is missing the required metadata
description entry, so `validate_objectives` will still reject it despite the
`_description` attribute on `BehaviorTree`. Update the `sort_blocks.xml`
objective to include a `<Metadata description="...">` entry consistent with the
tree’s current description, and make sure the `TreeNodesModel` metadata
requirements remain satisfied alongside `subcategory` in the objective
definition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bfc265f8-c6b8-4f7c-96f6-745905e527d9

📥 Commits

Reviewing files that changed from the base of the PR and between 18edcb7 and 4543585.

📒 Files selected for processing (2)
  • src/moveit_pro_franka_configs/dual_arm_sim/objectives/create_point_cloud_vector_from_masks.xml
  • src/moveit_pro_franka_configs/dual_arm_sim/objectives/sort_blocks.xml

fdavulcu and others added 2 commits June 30, 2026 17:22
…tor From Masks

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… completion

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fdavulcu fdavulcu force-pushed the backport/sort-blocks-fixes-v8.10 branch from 4543585 to 2fe3f11 Compare June 30, 2026 15:23
@fdavulcu fdavulcu merged commit d9fce00 into v8.10 Jun 30, 2026
6 checks passed
@fdavulcu fdavulcu deleted the backport/sort-blocks-fixes-v8.10 branch June 30, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant